Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Stop loading artifacts when deleting runs, fix potential NullPointerException #271

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

eamansour
Copy link
Member

@eamansour eamansour commented Sep 6, 2024

Why?

See galasa-dev/projectmanagement#1210

Deleting runs from the Galasa service is much slower than it should be because it loads all attached artifacts for a run into a filesystem when fetching a run by its ID. This work is unnecessary when deleting runs since we only care about IDs of the documents to delete related to the run (i.e. log documents, artifact documents, and the run document itself).

Changes

  • Stopped loading artifact attachments when fetching a run for deletion
  • Guarded against a NullPointerException when deleting a run that could not be fetched
  • Added unit tests for deleting runs

…carding runs, unit tests

Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com>
@galasa-team
Copy link

Build successful

1 similar comment
@galasa-team
Copy link

Build successful

Signed-off-by: Eamonn Mansour <47121388+eamansour@users.noreply.github.com>
@eamansour eamansour force-pushed the iss1210-delete-runs-performance branch from aad4547 to c1d0b05 Compare September 10, 2024 08:54
@galasa-team
Copy link

Build successful

Copy link
Contributor

@aashir21 aashir21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@eamansour eamansour merged commit 57fa314 into main Sep 10, 2024
6 checks passed
@eamansour eamansour deleted the iss1210-delete-runs-performance branch September 10, 2024 09:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants